package com.hjxr.sysadmin.zsj.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjxr.sysadmin.zsj.mapper.UserProjectMapper;
import com.hjxr.sysadmin.zsj.domain.UserProject;
import com.hjxr.sysadmin.zsj.service.IUserProjectService;

/**
 * 用户产业Service业务层处理
 *
 * @author hjxr
 * @date 2021-04-16
 */
@Service
public class UserProjectServiceImpl implements IUserProjectService
{
    @Autowired
    private UserProjectMapper userProjectMapper;

    /**
     * 查询用户产业
     *
     * @param userProjectId 用户产业ID
     * @return 用户产业
     */
    @Override
    public UserProject selectUserProjectById(Long userProjectId)
    {
        return userProjectMapper.selectUserProjectById(userProjectId);
    }

    /**
     * 查询用户产业列表
     *
     * @param userProject 用户产业
     * @return 用户产业
     */
    @Override
    public List<UserProject> selectUserProjectList(UserProject userProject)
    {
        return userProjectMapper.selectUserProjectList(userProject);
    }

    /**
     * 新增用户产业
     *
     * @param userProject 用户产业
     * @return 结果
     */
    @Override
    public int insertUserProject(UserProject userProject)
    {
        return userProjectMapper.insertUserProject(userProject);
    }

    /**
     * 修改用户产业
     *
     * @param userProject 用户产业
     * @return 结果
     */
    @Override
    public int updateUserProject(UserProject userProject)
    {
        return userProjectMapper.updateUserProject(userProject);
    }

    /**
     * 批量删除用户产业
     *
     * @param userProjectIds 需要删除的用户产业ID
     * @return 结果
     */
    @Override
    public int deleteUserProjectByIds(Long[] userProjectIds)
    {
        return userProjectMapper.deleteUserProjectByIds(userProjectIds);
    }

    /**
     * 删除用户产业信息
     *
     * @param userProjectId 用户产业ID
     * @return 结果
     */
    @Override
    public int deleteUserProjectById(Long userProjectId)
    {
        return userProjectMapper.deleteUserProjectById(userProjectId);
    }

    @Override
    public List<Map<String, Object>> selectUserProject(UserProject userProject) {
        return userProjectMapper.selectUserProject(userProject);
    }

}
